package cn.com.haopy.dataes.db.service.main;

import cn.com.haopy.dataes.db.entity.main.HDNoticeAdmin;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface HDNoticeAdminService extends IService<HDNoticeAdmin> {
    Page<HDNoticeAdmin> querySelective(String title, String type, Integer adminId, Integer pageNo, Integer size, String sort, String order);
    List<HDNoticeAdmin> queryByNoticeId(Integer noticeId);

    HDNoticeAdmin findByNIdAId(Integer noticeId, Integer adminId);

//    @Override
//    boolean save(HDNoticeAdmin noticeAdmin);
//    @Override
//    boolean updateById(HDNoticeAdmin noticeAdmin);

    boolean markReadByIdsAId(List<Integer> ids, Integer adminId);

    boolean deleteByIdAId(Integer id, Integer adminId);

    boolean deleteByIdsAId(List<Integer> ids, Integer adminId);

    boolean deleteByNoticeId(Integer noticeId);
    boolean deleteByNoticeIds(List<Integer> noticeIds);

    int countUnreadByAId(Integer adminId);
    int countReadByNoticeId(Integer noticeId);

    boolean updateByNoticeId(HDNoticeAdmin noticeAdmin, Integer noticeId);
}
